#ifndef __TASKQUEUE_H__
#define __TASKQUEUE_H__

#include "MutexLock.hpp"
#include "Condition.hpp"

#include <queue>

using std::queue;

namespace wd
{

class TaskQueue
{
public:
    TaskQueue(int);
    bool empty() const;
    bool full() const;
    void push(int);
    int pop();

private:
    queue<int> _que;
    int        _queSize;
    MutexLock  _mutex;
    Condition  _notFull;
    Condition  _notEmpty;
};

}// end of namespace wd

#endif

